home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20041116-20060924 / 000214_slash_dev_slas…_2000@yahoo.com_Thu Dec 1 11:46:44 2005.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Path: newsmaster.cc.columbia.edu!panix!newsfeed-00.mathworks.com!newscon06.news.prodigy.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail
  2. From: "Mark Sapiro" <slash_dev_slash_null_2000@yahoo.com>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Take command exiting...
  5. Date: 30 Nov 2005 21:41:17 -0800
  6. Organization: http://groups.google.com
  7. Lines: 69
  8. Message-ID: <1133415677.052842.20950@f14g2000cwb.googlegroups.com>
  9. References: <1133384455.038767.79060@o13g2000cwo.googlegroups.com>
  10.    <slrndos597.2sq.fdc@sesame.cc.columbia.edu>
  11.    <1133386372.686029.66160@g47g2000cwa.googlegroups.com>
  12. NNTP-Posting-Host: 209.182.169.133
  13. Mime-Version: 1.0
  14. Content-Type: text/plain; charset="iso-8859-1"
  15. X-Trace: posting.google.com 1133415694 4467 127.0.0.1 (1 Dec 2005 05:41:34 GMT)
  16. X-Complaints-To: groups-abuse@google.com
  17. NNTP-Posting-Date: Thu, 1 Dec 2005 05:41:34 +0000 (UTC)
  18. User-Agent: G2/0.2
  19. X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20051012 Netscape/8.0.4,gzip(gfe),gzip(gfe)
  20. Complaints-To: groups-abuse@google.com
  21. Injection-Info: f14g2000cwb.googlegroups.com; posting-host=209.182.169.133;
  22.    posting-account=iQNWIg0AAAAD2fStXNC9nwGlPdSqjWrI
  23. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15460
  24.  
  25. malone wrote:
  26. > That is just it, if it does not detect a problem or if it runs into a
  27. > condition that was not previously available it continues with the input
  28. > / output dialog. I do not want to ctrl-C out of the script of about 100
  29. > command files to open command file #5  insert an end and then call the
  30. > initiating script again.
  31. >
  32. > I know I could fix the problem and call only those files that were not
  33. > called earlier but I would prefer to only bypass the command file that
  34. > had the problem and continue processing the other 100 command files.
  35. >
  36. > What exactly is the Input cancellation command? and is that a way that
  37. > I can cancel the input dialog and enter an end?
  38.  
  39.  
  40. What are you doing in the 'command files'.
  41.  
  42. It seems you need to make them more robust. I.e., every 'output'
  43. command should be followed by an 'input' with a time out that checks
  44. for the expected response and that followed by an 'if failure ...' . If
  45. you simply want to stop that command file, but continue the higher
  46. level script, this could just be 'if failure end' or 'if failure end 0
  47. message to print'. Other commands like send and get should also be
  48. tested with 'if failure' or 'if success'.
  49.  
  50. Here's a piece of script as an example. These use 'end 1' because I
  51. want this to signal failure to a caller, but you could use 'end 0' to
  52. signal success. Of course, if you don't test success/failure/status in
  53. the caller, it doesn't matter :-)
  54.  
  55. set host /pty ssh -e none -l \v(userid) \m(rhost).\m(rdomain)
  56. if fail end 1 Unable to connect to \m(rhost).
  57. input 30 assword:
  58. if fail end 1 No password prompt.
  59. output \m(pswd1)\13
  60. input 20 \m(rhost)
  61. if fail end 1 No shell prompt.
  62. input 5 %
  63. if fail end 1 No shell prompt.
  64. output kermit -Y\13
  65. input 20 C-Kermit>
  66. if fail end 1 No Kermit prompt.
  67. output set receive pathnames relative\13
  68. set send pathnames relative
  69. input 20 C-Kermit>
  70. if fail end 1 No Kermit prompt.
  71. output set file collision update\13
  72. input 20 C-Kermit>
  73. if fail end 1 No Kermit prompt.
  74. output server\13
  75. input 20 SERVE...
  76. if fail end 1 Not in server mode.
  77. input 2 \10
  78. if fail end 1 How can this be?
  79. ...
  80.  
  81. In your case, you may need to test for something more complex than
  82. another prompt or look for something with input that signals failure,
  83. e.g.
  84.  
  85. input 5 error
  86. if success end
  87.  
  88. Or you may need to test some environment variable or \v(exitstatus).
  89.  
  90. --
  91. Mark Sapiro msapiro at value net       The highway is for gamblers,
  92. San Francisco Bay Area, California    better use your sense - B. Dylan
  93.